The FileGate is a CommuniGate communication module that transfers messages to and from plain text files.
Applications can use the FileGate to send messages: if an application composes a message as a plain text file and places that file in the FileGate OutBox folder, the FileGate reads it and submits the message to the system in the same way as if that messages was read from the Internet.
Applications can use the FileGate to receive messages: if a message is addressed/routed to FileGate, the <user name> part of the address is used as a name of a folder or a text file inside the FaxGate InBoxes folder. If a folder is found, the FileGate stores the message in that folder as a plain text file. If a text file is found, the FileGate appends the message (converted to the plain text format) to the file. So, each application can have its own InBox and it can receive messages either by scanning the folder and reading the text files found, or by reading the mailbox text file.
The FileGate allows to use the CommuniGate Server with some mailers that can exchange messages via the file system. For example, you can use Eudora in the "uucp" mode on machines connected to the File Server that also runs the CommuniGate Server. It is especially useful if you use PPP on the CommuniGate Server: since the current version of MacOS does not allow to use TCP/IP via Ethernet if you use PPP, computers on your Ethernet network cannot access the Server via the regular SMTP and POP protocols.
Submitting messages.
Since the process of sending a message from an application is actually the process of messages receiving from the CommuniGate System point of view, we use the term submitting here.
When the FileGate is installed, it creates the FileGate OutBox folder inside the CommuniGate folder on the server computer. The FileGate scans that folder periodically and looks for a text file (i.e. a file of the type TEXT). It tries to open that file, reads it and passes the content to the server kernel that processes Internet messages. After the kernel creates a message file and submits it to the system, the FileGate deletes the text file processed and rescans the FileGate OutBox folder.
Note: since a message is processed by the same kernel routines that process Internet e-mail, the text file with a message should be created following the RFC822 standard (i.e., the first part of the message should contain the RFC822 headers, then the message body text separated with an empty line). The regular <Return> symbol should be used to separate lines. The plain text file can contain a MIME-encoded message, and it can contain encoded attachments in a form that the CommuniGate Server recognizes: MIME attachments, BinHex, UUencode, AppleDouble/AppleSingle, etc.
Note: since the FileGate opens any text file in the FileGate OutBox folder as soon as it detects such a file, it is important that a message file is closed by the application before the FileGate can find it. Two methods can be used:
a) create a non-TEXT file in the FileGate OutBox folder, fill it with the message text, close it and change the file type to TEXT.
b) create a TEXT file in the Temporary Items folder on the same disk, fill it with the message text, close the file and move it into the FileGate OutBox folder; this method is better since all files "forgotten" in the Temporary Items folder are automatically moved to the Trash after the next system restart.
Note: all text files with names staring with "X." are simply deleted without processing. This allows to use FileGate to process messages generated with some mailers (Eudora, for example) that can store a couple of "uucp files" - D-files with actual message data and X-files with addressing info.
Note: if an application stores text with an extended character set (i.e. with characters that are not included into the US-ASCII set), the CommuniGate Server will decode them using the Default Internet Character Set server option. If the application uses the MacOS character set, it should store messages in the MIME format, and set the "charset" parameter to "us-ascii": this parameter value indicates that no decoding is required.
Retrieving messages.
Since the process of receiving a message from an application is actually the process of messages sending from the CommuniGate System point of view, we use the term retrieving here.
When the FileGate is installed, it creates the FileGate InBoxes folder inside the CommuniGate folder on the server computer. Then, for each application that should retrieve messages from the Communigate System, you should create a folder inside the FileGate InBoxes folder.
When a message is directed to <folder name>%FileGate or to <folder name>%file, the FileGate processes such a message: it passes it to the Communigate Server kernel that converts the message into the Internet format. The FileGate stores the resulting text in a text file in the folder <folder name>. If the folder <folder name> does not exist, an error message is generated and sent back to the sender.
An application should check its folder in the FileGate InBoxes fodler: if a text file (a file of the type TEXT) is found there, the application should read and process it, and then it should remove the file from the folder.
Usually, messages are converted to use an extended character set (i.e. characters outside the standard US-ASCII symbol range). The default server settings and/or Internet Character Set option in a message specify which character set to use when converting a message into an Internet RFC822 plain text message. If your application prefers to read extended characters in the MacOS character set, select the Store in MacOS character set FileGate Service Settings option.
If the retrieving applications do not support MIME, the Never use MIME encoding option can be selected in the FileGate Service Settings: all messages will be stored in InBoxes without MIME extensions, in this case only the plain message text and attachments (if any) will be stored in the file.
If the retrieving applications do not process attachments, select the Store without Attachments option: all attachments will be ignored when messages are converted into text files.
The latest version of the FileGate can be obtained from:
http://www.stalker.com
or
ftp://ftp.stalker.com
Installation
Place the FileGate module into the Modules folder inside the CommuniGate Folder in your System Folder. Restart the CommuniGate Server.
Find the FileGate InBoxes folder and create mailbox folders in that folder.
Configuring
The FileGate requires no configuring.
Routing
If your application expects to see incoming mail in the "myApp1" folder, the messages should be sent to myApp1%filegate@your.communigate.domain.
Since it is not a good-looking address, it is much better to use aliases. In the Router table, enter the following alias:
<myApp1> = myApp1%filegate
In this case one can send messages to myApp1@your.communigate.domain: the myApp1 is treated as a local user name, so the Alias table will be checked first. As a result, messages will be redirected to MyApp1%filegate, and the FileGate will store them in the MyApp1 folder.
Using with File-Based ("uucp") Eudora
The Eudora mailer can exchange messages via file system. For those users that have to use the Eudora (or other mailer of that kind) in this mode, create text mailbox files (using user names as file names) in the FileGate InBoxes folder, and enter their names in the Alias table: <username> = username@filegate
For each user, follow the instructions of the mailer used to specify that file as the user InBox, and specify the FileGate OutBox as the folder where the mailer should store the messages sent.
Revision History
1.1
• When storing message, the From line (in the uucp routing format) is added.
• Storing messages in text file mailboxes is implemented.
• Processing of the From lines in the incoming messages (in the OutBox) is implemented.